﻿<Window 
    x:ClassModifier="internal"
    x:Class="zeal.ui.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ui="clr-namespace:zeal.ui"
    xmlns:graph="clr-namespace:zeal.ui.graph" 
    xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock" 
    xmlns:editor="clr-namespace:zeal.ui.editor"
    Width="800" Height="600">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Menu Grid.Row="0" Height="22" VerticalAlignment="Top" Margin="0,0,0,0">
            <MenuItem Header="File">
                <MenuItem Command="New" />
                <MenuItem Command="Open" />
                <MenuItem Command="Save" />
                <MenuItem Command="SaveAs" />
                <MenuItem Command="{x:Static ui:MainWindow.saveAllCommand}" />
                <MenuItem Command="Close" />
                <Separator/>
                <MenuItem Command="{x:Static ui:MainWindow.exitCommand}"/>
            </MenuItem>
            <MenuItem Header="Edit">
                <MenuItem Command="Undo"/>
                <MenuItem Command="Redo" />
                <Separator/>
                <MenuItem Command="Cut" />
                <MenuItem Command="Copy" />
                <MenuItem Command="Paste" />
                <Separator />
                <MenuItem Command="SelectAll" />
                <MenuItem Command="{x:Static graph:GraphEditor.layoutCommand}" />
                <Separator/>
                <MenuItem Header="Snap to Grid" IsCheckable="True" IsChecked="{Binding Source={x:Static ui:ApplicationSettings.Default}, Path=snapToGrid, Mode=TwoWay}" />
            </MenuItem>
        </Menu>
        <!--<graph:GraphEditor Grid.Row="1" />-->
        <ad:DockingManager Grid.Row="1">
            <ad:ResizingPanel Orientation="Horizontal">
                <ad:DocumentPane>
                    <graph:GraphEditor Filename="Graph1" />
                    <editor:CodeEditor Title="Code1" />
                </ad:DocumentPane>
            </ad:ResizingPanel>
        </ad:DockingManager>
    </Grid>
</Window>
